package com.legrand.security.token;

import com.legrand.core.entity.User;
import lombok.Data;
import org.springframework.security.core.GrantedAuthority;
import java.util.List;

/**
*@author xiah
*2018-07-10 05:55:03
*/

@Data
public class UserContext implements java.io.Serializable {

       private static final long serialVersionUID = 3847586464400346061L;

       private final Integer userId;

       private final String username;

       private final String telephone;

       private final List<String> userRoles;

       private User user = new User();

       @SuppressWarnings("unused")
       private List<GrantedAuthority> authorities;

       public UserContext(Integer userId, String username, String telephone, List<String> userRoles) {
              this.userId = userId;
              this.username = username;
              this.telephone = telephone;
              this.userRoles = userRoles;
       }


}
